const fs = require('fs');
const path = require('path');

console.log(__dirname); // D:\myProfessionalProfiles\QDSJK\Node\relearn
console.log(path.join(__dirname, 'a.js')); // D:\myProfessionalProfiles\QDSJK\Node\relearn\a.js

fs.readFile(path.join(__dirname, 'a.js'), 'utf8', (err, doc) => {
    try {
        console.log(doc);
    } catch (e) {
        console.log('读取文件失败', e);
    }
})
